package atguigu06.polymorphism.exer1;

/**
 * ClassName: GeometricTest
 * Package: atguigu06.polymorphism.exer1
 * Description:
 *
 * @Author BuTang
 * @Create 2023/3/8 9:48
 * @Version 1.0
 */
public class GeometricTest {

    public boolean equalsArea(GeometricObject g1 , GeometricObject g2){
        if (g1.findArea() == g2.findArea()) {
            return true;
        }
     else {
        return false;
    }
    }
    public void displayGeometricObject(GeometricObject g1){
        System.out.println(g1.findArea());
    }
    public static void main(String[] args) {
        GeometricTest test1 = new GeometricTest();
        String red = "red" ;
        Circle c1 = new Circle(red,1,1);
        Circle c2 = new Circle("red",1,1);
        boolean test = test1.equalsArea(c1 ,c2);
        System.out.println(test);
        test1.displayGeometricObject(c1);
        test1.displayGeometricObject(c2);
    }
}
